package com.superbytecode.cloud.common.model.mq;

/**
 * All rights Reserved, Designed By www.super-master.com
 *
 * @ProjectName: beacon-cloud
 * @Package: com.superbytecode.cloud.common.model.mq
 * @ClassName: MQTopic
 * @Description: [MQ消息接口]
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2024/11/1 18:52
 * @Version: V1.0
 * @Copyright: 2024 www.super-master.com Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
public interface MQTopic<T> {
    /**
     * MQ消息生产
     *
     * @param body 消息内容
     */
    default void product(T body) {
    }

    /**
     * MQ自定义消息生产
     *
     * @param configure 自定义配置
     * @param body      消息内容
     */
    default void product(MQConfigure configure, T body) {
    }

    /**
     * MQ消息消费
     *
     * @param body 消息内容
     */
    void consume(T body);
}